import request from '@/utils/request'
import { ILoginData } from '@/types/login'
import { AxiosPromise } from 'axios'
/**
 * 登录接口
 * @param data
 * @returns
 */
function loginApi(data: ILoginData): AxiosPromise {
  return request({
    url: '/users/login',
    method: 'post',
    data
  })
}

export { loginApi }
